<style lang="stylus" scoped>

</style>

<template>
  <div>
    <q-chip :dense="dense" :square="square" :color="color" :label="label" text-color="white"/>
  </div>
</template>

<script>
export default {
  props: {
    label: {
      type: String,
      required: true
    },
    type: {
      type: String,
      required: true
    },
    dense: {
      type: Boolean,
      default: true
    },
    square: {
      type: Boolean,
      default: true
    }
  },
  data () {
    return {

    }
  },
  computed: {
    color () {
      let color = ''
      switch (this.type) {
        case 'done':
          color = 'positive'
          break
        case 'error':
          color = 'negative'
          break
        case 'warning':
          color = 'warning'
          break
        case 'info':
          color = 'info'
          break
        default:
          break
      }
      return color
    }
  }
}
</script>
